package com.atguigu.springcloud.config;



import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author 赵雨强
 * @create 2021/4/30 11:20
 */
@Configuration
public class ApplicationContextConfig {

    @Bean
    /**
     *  负载均衡
     *  手写轮询算法
     */
    @LoadBalanced
    public RestTemplate getRestTemplate(){
        return  new RestTemplate();
    }
}
